package com.zmzncs.lmtc.module.shop.pojo.shop_order;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author 高博文
 * @Date 2021/05/25 10:22
 */
@Data
public class ShopOrderSearchForm {

    @ApiModelProperty(value = "订单编号、会员名称、手机号")
    private String record;

    @ApiModelProperty(value = "商家名称、商品名称")
    private String shopRecord;

    @ApiModelProperty(value = "订单状态（0：待支付，4：已退款,5待核销，6已核销）")
    private Integer orderStatus;

    @ApiModelProperty(value = "下单开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginTime;

    @ApiModelProperty(value = "下单结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    @ApiModelProperty(value = "页码")
    private Integer currentPage = 1;

    @ApiModelProperty(value = "每页记录数")
    private Integer pageSize = 10;

    public Page getPage() {
        return new Page(currentPage, pageSize);
    }
}
